import echarts from 'echarts'
export default {
    name: 'echart',
    echartsidlist: [],
    echartslist: [],
    draweharts: function(_id, _option) {
        this.echartsidlist=[];
        this.echartslist=[];
        var myChart = echarts.init(document.getElementById(_id));
        this.echartsidlist.push(_id);
        this.echartslist.push(myChart);
        myChart.setOption(_option);
        window.addEventListener("resize", function() {
            myChart.resize();
        });
    },
    clearEcharts(){
        this.echartsidlist=[];
        this.echartslist=[];
    }
}
